<template>
	<view class="box" :style="{'padding-top':systemHeight+28.5+'px'}">
		<view class="head">
			<image class="back" src="/static/img/back.png" @click="back"></image>
			<view class="title">Settings</view>
			<view class="right"></view>
		</view>
		<view class="row" v-for="(item,index) in rowList" :key="item.id" @click="next(item.id,item.url)">
			<view>{{item.title}}</view>
			<image class="next" src="/static/img/right.png"></image>
			<view class="phone" v-if="item.id==1">12345678912</view>
		</view>
		<view class="out">Sign out</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemHeight: null,
				rowList:[{
					id:1,
					title:'Mobile Number',
					url:"/pages/setting/changePassword"
				},{
					id:2,
					title:'Email',
					url:"/pages/setting/changePassword"
				},{
					id:3,
					title:'Password',
					url:"/pages/setting/changePassword"
				},{
					id:4,
					title:'Privacy',
					url:'/pages/setting/Privacy'
				},{
					id:5,
					title:'Legal',
					url:"/pages/setting/changePassword"
				},{
					id:6,
					title:'About GoPita',
					url:"/pages/setting/changePassword"
				}]
			}
		},
		created() {
			this.systemHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			//功能跳转
			next(type,url){
				uni.navigateTo({
					url:url
				})
			},
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.box {
		position: fixed;
		width: 100%;
		height: 100vh;
	}

	.head {
		margin: 0rpx auto 83rpx;
		width: 92%;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.back {
		width: 20rpx;
		height: 36rpx;
	}

	.title {
		font-family: Mont;
		font-weight: bold;
		font-size: 32rpx;
	}

	.right {
		width: 20rpx;
	}
	.row{
		position: relative;
		border-bottom: 1rpx solid #F4F4F4;
		padding-bottom: 50rpx;
		margin: 0rpx auto 49rpx;
		width: 92%;
		font-family: Mont;
		font-weight: 500;
		font-size: 28rpx;
	}
	.next{
		position: absolute;
		top:10rpx;
		right: 0rpx;
		width: 11rpx;
		height: 20rpx;
	}
	.phone{
		position: absolute;
		top: 0;
		right: 25rpx;
		font-family: Mont;
		font-weight: 500;
		font-size: 28rpx;
		color: #4C4B4B;
	}
	.out{
		position: absolute;
		bottom:190rpx;
		left: 50%;
		transform: translate(-50%,0);
		width: 690rpx;
		height: 92rpx;
		background: #34BA78;
		border-radius: 46rpx;
		font-family: Mont;
		font-weight: bold;
		font-size: 30rpx;
		color: white;
		line-height: 92rpx;
		text-align: center;
	}
</style>